//
//  NKNetworkManager.h
//  NKMapTest
//
//  Created by SongGang on 2017/4/11.
//  Copyright © 2017年 NK. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef enum : NSUInteger {
    REQUESTTYPEGET,
    REQUESTTYPEPOST,
} REQUESTTYPE;


@interface NKNetworkManager : AFHTTPSessionManager

+ (instancetype _Nullable )shareInstance;

// 网络请求
- (void)requestType: (REQUESTTYPE)requestType withUrlString: (NSString *_Nullable)urlString parames: (id _Nullable )parames success: (void (^_Nullable) (id _Nullable responseObject))success failure: (void (^_Nullable)(id _Nullable error))failure;
// 网络上传
- (void)uploadWithUrlString: (NSString *_Nullable)urlString parameters: (id _Nullable )parameters uploadFileUrl:(NSURL *_Nullable)fileUrl fileName: (NSString *_Nullable)fileName progress:(nullable void (^)(NSProgress * _Nullable uploadProgress))progress success: (void (^_Nullable)(id _Nullable responseObject))success failure: (void (^_Nullable)(NSError * _Nullable error))failure;
// 网络下载
- (void)downLoadWithUrl: (NSString *_Nullable)urlstring parameters:(id _Nullable )parameters destinationUrl: (NSString *_Nullable)destinationUrl progerss:(void (^_Nullable)(NSProgress * _Nullable progress))progress success: (void (^_Nullable)(NSURL * _Nullable filePath))success failure:(void (^_Nullable)(NSError * _Nullable error))failure;

@end
